window.onload = function() {
    var showwindow = document.getElementById("showwindow");
    var portion = document.getElementById("portion");
    var ptimg = portion.getElementsByTagName("img");
    var showsrc = showwindow.getAttribute("src");
    for(i = 0; i < ptimg.length; i++) {
        var ptsrc = ptimg[i].getAttribute("src");
        ptimg[i].onmouseenter = (function(a) {
            return  function() {
                showwindow.setAttribute("src", a);
            }
        })(ptsrc)
        ptimg[i].onmouseleave = function() {
                showwindow.setAttribute("src", showsrc);
        }
    }
}